package com.qpkj.oms.service.impl;

import java.util.List;
import com.qpkj.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.qpkj.oms.mapper.OmsStockRecoderMapper;
import com.qpkj.oms.domain.OmsStockRecoder;
import com.qpkj.oms.service.IOmsStockRecoderService;

/**
 * 库存记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-12-20
 */
@Service
public class OmsStockRecoderServiceImpl implements IOmsStockRecoderService 
{
    @Autowired
    private OmsStockRecoderMapper omsStockRecoderMapper;

    /**
     * 查询库存记录
     * 
     * @param recoderId 库存记录主键
     * @return 库存记录
     */
    @Override
    public OmsStockRecoder selectOmsStockRecoderByRecoderId(Long recoderId)
    {
        return omsStockRecoderMapper.selectOmsStockRecoderByRecoderId(recoderId);
    }

    /**
     * 查询库存记录列表
     * 
     * @param omsStockRecoder 库存记录
     * @return 库存记录
     */
    @Override
    public List<OmsStockRecoder> selectOmsStockRecoderList(OmsStockRecoder omsStockRecoder)
    {
        return omsStockRecoderMapper.selectOmsStockRecoderList(omsStockRecoder);
    }

    /**
     * 新增库存记录
     * 
     * @param omsStockRecoder 库存记录
     * @return 结果
     */
    @Override
    public int insertOmsStockRecoder(OmsStockRecoder omsStockRecoder)
    {
        omsStockRecoder.setCreateTime(DateUtils.getNowDate());
        return omsStockRecoderMapper.insertOmsStockRecoder(omsStockRecoder);
    }

    /**
     * 修改库存记录
     * 
     * @param omsStockRecoder 库存记录
     * @return 结果
     */
    @Override
    public int updateOmsStockRecoder(OmsStockRecoder omsStockRecoder)
    {
        omsStockRecoder.setUpdateTime(DateUtils.getNowDate());
        return omsStockRecoderMapper.updateOmsStockRecoder(omsStockRecoder);
    }

    /**
     * 批量删除库存记录
     * 
     * @param recoderIds 需要删除的库存记录主键
     * @return 结果
     */
    @Override
    public int deleteOmsStockRecoderByRecoderIds(Long[] recoderIds)
    {
        return omsStockRecoderMapper.deleteOmsStockRecoderByRecoderIds(recoderIds);
    }

    /**
     * 删除库存记录信息
     * 
     * @param recoderId 库存记录主键
     * @return 结果
     */
    @Override
    public int deleteOmsStockRecoderByRecoderId(Long recoderId)
    {
        return omsStockRecoderMapper.deleteOmsStockRecoderByRecoderId(recoderId);
    }
}
